![]() |
GetCurrentKeyModifiers |
||||
Header: | Events.h | Carbon status: | Supported | |
Returns the current state of the keyboard modifier keys.
UInt32 GetCurrentKeyModifiers ();
A bit mask indicating which keyboard modifier keys are pressed. See "Event Modifier Constants" for a list of possible values.
GetCurrentKeyModifiers provides a more convenient way to get the modifier key state than calling GetNextEvent. It returns a value whose individual bits indicate which keyboard modifier keys are currently being pressed. You can test for the Caps Lock, Shift, Control, Option, and Command keys using the Event Modifier Constants defined by the Event Manager.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)